//
//  PostVocherListVIew.m
//  meiyinxiang
//
//  Created by 媒印象 on 2017/12/21.
//  Copyright © 2017年 hbjApple. All rights reserved.
//

#import "PostVocherListVIew.h"
@interface PostVocherListVIew ()
@property (weak, nonatomic) IBOutlet UITextField *moneyNumTextField;
@property (weak, nonatomic) IBOutlet UITextField *moneyCountTextField;

@end
@implementation PostVocherListVIew
- (IBAction)sendBtn:(id)sender {
    if (self.moneyNumTextField.text.integerValue < 1 || self.moneyCountTextField.text.integerValue < 1) {
        ShowSVProgressErrorMessage(@"请填写正确的金额及个数");
       // [SVProgressHUD showErrorWithStatus:@"请填写正确的金额及个数"];
    }
    [[MYXHttpManager shared] postVocherWithLat:self.lat lon:self.lon count:self.moneyCountTextField.text money:self.moneyNumTextField.text withResult:^(BOOL sucess, NSString *msg) {
        if (sucess) {
            if (self.tapBlock) {
                self.tapBlock();
            }
            [SVProgressHUD showSuccessWithStatus:msg];
        }else{
            ShowSVProgressErrorMessage(msg);

         //   [SVProgressHUD showErrorWithStatus:msg];
        }
    }];
    
}
+ (PostVocherListVIew *)loadNibWithVocher{
    UINib *nib = [UINib nibWithNibName:@"PostVocherListVIew" bundle:[NSBundle mainBundle]];
    return [[nib instantiateWithOwner:nil options:nil] lastObject];
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
